#include "deliver.h"


Deliver::Deliver(const std::string &app_name, const std::string &sub_name, const char *data, int size, int flag)
    : app_name_(app_name), sub_name_(sub_name), data_(data), size_(size), flag_(flag), is_reply_(false)
{
}

Deliver::~Deliver()
{
}

std::string Deliver::appName() const
{
    return app_name_;
}

std::string Deliver::subName() const
{
    return sub_name_;
}

const char *Deliver::data() const
{
    return data_;
}

int Deliver::size() const
{
    return size_;
}

int Deliver::flag() const
{
    return flag_;
}

Reply *Deliver::reply()
{
    return &reply_;
}

bool Deliver::isReplied()
{
    return is_reply_;
}

void Deliver::setReplied(bool replied)
{
    is_reply_ = replied;
}

std::mutex *Deliver::mutex()
{
    return &mutex_;
}

std::condition_variable *Deliver::cond()
{
    return &cond_;
}
